<template>
  <div class="easter-egg-hint" :class="{ show: show }">
    <div class="hint-content">
      <span class="hint-icon">🎮</span>
      <span class="hint-text">{{ text }}</span>
    </div>
  </div>
</template>

<script setup lang="ts">
  import { defineOptions } from 'vue';

  defineOptions({
    name: 'EasterEggHint',
  });

  interface Props {
    show: boolean;
    text?: string;
  }

  withDefaults(defineProps<Props>(), {
    text: '试试按 ← 键返回上一页',
  });
</script>

<style scoped lang="scss">
  /* 彩蛋提示 */
  .easter-egg-hint {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(24, 144, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.9rem;
    z-index: 1000;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(24, 144, 255, 0.3);
  }

  .easter-egg-hint.show {
    transform: translateX(0);
  }

  .hint-content {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .hint-icon {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
  }

  .hint-text {
    font-weight: 500;
  }

  @keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-8px);
    }
    60% {
      transform: translateY(-4px);
    }
  }

  @media (max-width: 768px) {
    .easter-egg-hint {
      top: 10px;
      right: 10px;
      font-size: 0.8rem;
      padding: 10px 12px;
    }
  }
</style>
